#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int n, m;
vector<int> c;
int binarySearch(int &i)
{
    int left = i + 1, right = n - 1;
    while (left <= right)
    {
        int mid = (left + right) / 2;
        if (c[mid] + c[i] == m)
            return c[mid];
        else if (c[mid] + c[i] > m)
            right = mid - 1;
        else
            left = mid + 1;
    }
    return -1;
}
int main()
{
    int tc;
    scanf("%d%d", &n, &m);
    for (int i = 0; i < n; i++)
    {
        scanf("%d", &tc);
        c.push_back(tc);
    }
    sort(c.begin(), c.end());
    for (int i = 0; i < n - 1; i++)
    {
        int tmp = binarySearch(i);
        if (tmp != -1)
        {
            printf("%d %d", c[i], tmp);
            return 0;
        }
    }
    printf("No Solution");
    return 0;
}